// my-fresh-blog/tailwind.config.ts
import { type Config } from "tailwindcss";

export default {
  content: [
    "./routes/**/*.{tsx,ts}",
    "./islands/**/*.{tsx,ts}", 
    "./components/**/*.{tsx,ts}",
  ],
  theme: {
    extend: {
      animation: {
        'fade-in': 'fadeIn 0.5s ease forwards',
        'fade-up': 'fadeUp 0.5s ease forwards',
        'scale-in': 'scaleIn 0.3s ease forwards',
        'float-leaf': 'floatLeaf 15s ease-in-out infinite',
      },
      keyframes: {
        fadeIn: {
          '0%': { opacity: '0' },
          '100%': { opacity: '1' },
        },
        fadeUp: {
          '0%': { opacity: '0', transform: 'translateY(10px)' },
          '100%': { opacity: '1', transform: 'translateY(0)' },
        },
        scaleIn: {
          '0%': { opacity: '0', transform: 'scale(0.95)' },
          '100%': { opacity: '1', transform: 'scale(1)' },
        },
        floatLeaf: {
          '0%': { transform: 'translate(0, 0) rotate(0deg)', opacity: '0' },
          '10%': { opacity: '1' },
          '100%': { transform: 'translate(-50vw, 100vh) rotate(360deg)', opacity: '0' },
        }
      },
      colors: {
        // 全新的色彩方案 - 柔和的米白色调
        primary: {
          50: '#faf7f2',
          100: '#f3ede2',
          200: '#e8ddc5',
          300: '#d9c7a3',
          400: '#c7af7f',
          500: '#b8986b',
          600: '#a68058',
          700: '#8c6747',
          800: '#735441',
          900: '#5f483c',
        },
        surface: {
          50: '#fdfcfa',
          100: '#f8f6f2',
          200: '#f0ece5',
          300: '#e4ddcf',
          400: '#cfc5b3',
          500: '#b4a99a',
          600: '#9d9184',
          700: '#82776c',
          800: '#6a625a',
          900: '#504a44',
        },
        accent: {
          emerald: '#43a583',
          amber: '#e8ae68',
          rose: '#cb7a7a',
        }
      },
      fontFamily: {
        'sans': ['Inter', 'system-ui', 'sans-serif'],
        'display': ['Fraunces', 'serif'],
        'mono': ['SF Mono', 'JetBrains Mono', 'monospace'],
      },
      letterSpacing: {
        'tighter': '-0.05em',
        'tight': '-0.025em', 
        'normal': '0em',
        'wide': '0.025em',
        'wider': '0.05em',
        'widest': '0.1em',
      },
      lineHeight: {
        'tighter': '1.15',
        'snug': '1.375',
        'relaxed': '1.625',
      },
      spacing: {
        '4.5': '1.125rem',
        '13': '3.25rem', 
        '18': '4.5rem',
        '68': '17rem',
        '84': '21rem',
        '128': '32rem',
      },
      borderWidth: {
        'px': '1px',
        'half': '0.5px',
      },
      borderRadius: {
        '4xl': '2rem',
        '5xl': '2.5rem',
      },
      boxShadow: {
        'subtle': '0 2px 10px rgba(0, 0, 0, 0.05)',
        'glass': '0 8px 32px rgba(15, 23, 42, 0.08)',
        'glow': '0 0 15px 1px rgba(109, 158, 225, 0.3)',
        'inner-sm': 'inset 0 1px 1px 0 rgb(0 0 0 / 0.05)',
      },
      backdropBlur: {
        'xs': '2px',
      },
      typography: (theme) => ({
        DEFAULT: {
          css: {
            '--tw-prose-body': theme('colors.surface.300'),
            '--tw-prose-headings': theme('colors.surface.50'),
            '--tw-prose-lead': theme('colors.surface.400'),
            '--tw-prose-links': theme('colors.primary.400'),
            '--tw-prose-bold': theme('colors.surface.200'),
            '--tw-prose-counters': theme('colors.surface.400'),
            '--tw-prose-bullets': theme('colors.surface.400'),
            '--tw-prose-hr': theme('colors.surface.700'),
            '--tw-prose-quotes': theme('colors.surface.200'),
            '--tw-prose-quote-borders': theme('colors.primary.700'),
            '--tw-prose-captions': theme('colors.surface.400'),
            '--tw-prose-code': theme('colors.accent.rose'),
            maxWidth: '70ch',
            fontSize: '1rem',
            lineHeight: 1.75,
            p: {
              marginTop: '1.25em',
              marginBottom: '1.25em',
            },
            'ul > li': {
              paddingLeft: '1.5em',
            },
          }
        },
      }),
    },
  },
  plugins: [],
} satisfies Config;